﻿using System;
using System.Collections;
using System.Net;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Google.GData.Client;
using Google.GData.Documents;
using Google.GData.AccessControl;
//using Google.Spreadsheets;
using Google.Documents; 

namespace DataType
{
    public class FeedWrapper<T> : EventArgs where T : Google.GData.Client.Entry, new() 
    {
        public Feed<T> m_Feed { get; set; }
    }

    public class Credentials : EventArgs
    {
        public bool m_remember { get; set; }
        public GDataCredentials m_Cred  { get; private set;}
        public string m_password { get; set; }

        public Credentials(string UserName, string Password)
        {
            m_Cred = new GDataCredentials(UserName, Password);
            m_remember = false;
            m_password = Password; 
        }
    };

    public class DocumentInfo : EventArgs
    {
        public string m_RemoteId { get; set; }
        public string m_FullName {get; set;}
        public string m_Name { get; set; }
        public DocumentEntry m_DocEntry { get; set; }

        public DocumentInfo(string FullName, string Name)
        {
            m_FullName = FullName;
            m_Name = Name;
        }
    }

    public class ShareInfoCollection : EventArgs
    {
       public DocumentEntry m_Doc { get; private set; }
       public AclFeed m_Feed { get; set; }

       public ShareInfoCollection()
       {
       }

       public ShareInfoCollection(DocumentEntry Doc)
       {
           m_Doc = Doc;
           //feed used here only as container for Entries, the connector feels it with web service specific info
           // in order to use it as real feed in batch operations
           m_Feed = new AclFeed(null, null);
       }
    }

    public class DownloadInfo : EventArgs
    {
        public Document m_Doc { get; set; }
        public Document.DownloadType m_type { get; set; }
        public System.IO.Stream m_Stream { get; set; }

        public DownloadInfo(Document Doc, Document.DownloadType Type)
        {
            m_Doc = Doc;
            m_type = Type;
            m_Stream = null; 
        }
    }
}
